<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_content
 * @copyright	Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

// Create a shortcut for params.
$params = &$this->item->params;
$images = json_decode($this->item->images);
$canEdit	= $this->item->params->get('access-edit');
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.framework');

preg_match( '/img(.*?)src\=\"(.*?)\"/', $this->item->introtext, $match );			
				$result = isset($match[2]) ? $match[2] : "";
				
				$arr = explode(" ", strip_tags($this->item->introtext));
				if(count($arr) >= 200)
				{
					$this->item->sintrotext = "";
					for($i=0; $i < 200; $i++)
					{
						$this->item->sintrotext .= $arr[$i]." ";
					}
					$this->item->sintrotext .= "...";
				}
				else $this->item->sintrotext = strip_tags($this->item->introtext);
				

?>


<li><img src="<?php echo $result; ?>" border="0">
<h2><?php echo $this->escape($this->item->title); ?></h2>
<p><?php echo $this->item->sintrotext ?></p>
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($this->item->slug, $this->item->catid)); ?>"><img src="<?php echo JURI::base() ?>/images/icon-circle-arrow.png" border="0"></a></li>


